package java3_23.Zoo;
//猩猩子类
public class Orangutan extends Mammal implements Swimming{
    public Orangutan(String name, String sex, String type) {
        super(name, sex, type);
    }

    @Override
    public void eat() {
        System.out.println(getType()+getName()+"正在吃虫子");
    }

    @Override
    public void play() {
        System.out.println(getType()+getName()+"正在河里玩耍");
        Orangutan.this.swim();
    }


    @Override
    public void swim() {
        System.out.println(getType()+getName()+"正在游泳");
    }
}
